﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NUnit.Framework;
using Wix.Aura.Common;

namespace Wix.Aura.UnitTests.Common {
	[TestFixture]
	public class ComplianceDriveSerialization : ComplianceCheckChildren {
		[Test]
		public void EmptyComplianceDriveComplianceCheck() {
			string expected = string.Format(baseXml, "<ComplianceDrive />");

			check.ComplianceDrive = new ComplianceDrive();

			Assertion(expected, project);
		}

		[Test]
		public void ComplianceDriveDirectorySearch() {
			string expected = string.Format(baseXml, @"<ComplianceDrive>
				<DirectorySearch Id=""Identifier"" />
			</ComplianceDrive>");

			check.ComplianceDrive = new ComplianceDrive();
			check.ComplianceDrive.Search = new DirectorySearch("Identifier");

			Assertion(expected, project);
		}

		[Test]
		public void ComplianceDriveDirectorySearchRef() {
			string expected = string.Format(baseXml, @"<ComplianceDrive>
				<DirectorySearchRef Id=""Identifier"" />
			</ComplianceDrive>");

			check.ComplianceDrive = new ComplianceDrive();
			check.ComplianceDrive.Search = new DirectorySearchRef("Identifier");

			Assertion(expected, project);
		}
	}
}
